<template>
    <div class="box">
        <el-table :data="listdata" height="400" style="width: 100%" v-loading="loading">
            <el-table-column prop="username" label="登录用户" width="180" />
            <el-table-column prop="lastLogin.ip" label="上次登录IP" width="180" />
            <el-table-column prop="lastLogin.loginTime" label="上次登录时间" sortable />
            <el-table-column prop="nowLogin.ip" label="本次登录IP" width="180" />
            <el-table-column prop="nowLogin.loginTime" label="本次登录时间" />
        </el-table>
    </div>
</template>

<script setup>
import *as api from "../../../api/listData.js"

import { ref, onMounted } from "vue"
let loading = ref(true)

let listdata = ref([])

onMounted(async () => {
    try {
        loading.value = true
        let res = await api.listDataLog(1, 15)
        listdata.value = res.data.data
        // console.log(listdata.value, 'iiiii');
        loading.value = false
    } catch (error) {
        loading.value = true
        loading.value = false
    }
})
</script>
<script>
export default {
    meta: {
        title: 'glsy', name: '管理首页', icon: "icon-zhongxin"
    }
}
</script>

<style lang="less" scoped>
// .box{
//     max-height: 450px;
//     overflow:auto;
// }
</style>